beginoutdoorscript;
variables;
int choice;
body;
beginstate 0;
break;
beginstate 1;
break;
beginstate 2;
break;
beginstate 11;
    reset_dialog();
    add_dialog_str(0, "You have come to a farm and butchery. The farmers greet you and ask if you would like to buy some of their production.", 0);
    add_dialog_str(1, "They have lots of  delicious-looking mutton, haunches, dried meat and steak that just scream to be eaten.", 0);
    add_dialog_choice(0, "Leave the farm.");
    add_dialog_choice(1, "Do some shopping.");
    choice = run_dialog(1);
    if (choice == 2)
        begin_shop_mode("Butchery", "These farmers are happy that you're not hostile. They have clearly had hard times with monsters.", 2, 4, -1);
break;
beginstate 12;
    reset_dialog();
    add_dialog_str(0, "This farm doesn't have a huge cropyard. But then you realize what kind of crops grow there. No doubt. This is a farm of an alchemist.", 0);
    add_dialog_str(1, "When you knock on the door, it gets kicked open by a young, tall woman in lilac robes. When she sees you she grabs a wand and begins to draw runes in the air with it.", 0);
    if (get_flag(201, 2) == 0)
        {
        add_dialog_str(2, "Then she realizes that you're not gonna charge, and she puts the wand away. She begins to speak: _Oh, just adventurers. I'm Clara, of the Alchemist's Lab._", 0);
        add_dialog_str(3, "_I grow crops for the Lab. Toadstools, herbs et cetera. I can also brew elixir. I guess adventurers like you could use some._", 0);
        }
    else add_dialog_str(2, "Then she recognizes you and puts her wand away. She says: _Oh, yes. What else do you want?", 0);
    add_dialog_choice(0, "Leave the farm.");
    add_dialog_choice(1, "Do some shopping.");
    choice = run_dialog(1);
    set_flag(201, 2, 1);
    if (choice == 2)
        begin_shop_mode("Clara's Elixir", "Besides growing the herbs, Clara has stocked up on excess crops and made elixir of them.", 5, 4, -1);
break;
beginstate 13;
    if (get_flag(201, 3) == 0)
        message_dialog("You take your first look at Alexandra. You have heard about it's colossal size, but you never thought it would be this big. You expected a city.", "What you found was a castle of a larger kind.");
    set_flag(201, 3, 1);
break;
beginstate 14;
    if (get_flag(201, 4) == 0)
        message_dialog("The desert seems to be fading away. You see small spots of grassland everywhere. Strange.", "You're not sure if this bizarre but effective spell is cast from Alexandra or the Alchemist's Lab.");
    set_flag(201, 4, 1);    
break;
beginstate 15;
    set_flag(201, 5, 1);
    message_dialog("Now that both the naga and the Orb of Nar is gone, a plane of bats seems to have found this area around the mountain desirable.", "A small squardon of rabid bats seem to have realized that there's no room for you here!");
break;
beginstate 16;
  if (get_flag(201, 6) == 0)
    {
    reset_dialog();
    if (get_flag(201, 5) == 1)
    add_dialog_str(0, "You think you have found the plane of the bats that ravage near the root of the mountain.", 0);
    else add_dialog_str(0, "You have found a bunch of bats.", 0);
    add_dialog_str(1, "You see lots of huge bats, must be over a dozen. All of them are rabid. You see also other creatures, much larger than the bats.", 0);
    add_dialog_str(2, "There are three ice drakes dominating the horde of bats. They're currently building a fleet for destroying the poor farmhouses nearby.", 0);
    add_dialog_str(3, "Then, one bat spots you.", 0);
    add_dialog_choice(0, "Run away, faaaast!");
    add_dialog_choice(1, "Give them something to fight!");
    choice = run_dialog(1);
    if (choice == 1)
        {
        message_dialog("Before you think of 'why?', you leap up and run away. The bat that saw you doesn't care about telling to the others of you.", "When you get further away, you hear loud screams from the farm. HmmmMaybe you should have stayed and fought.");
        set_flag(201, 6, 2);
        outdoor_enc_result(3);
        end();
        }
    else message_dialog("You draw your blades and bows. The bats immediatly alert the ice drakes to get rid of you. They charge.", "Then, someone steps out from the farmhouse and throws something at you. It is a puppet, a few inches tall. When it hits the ground, it begins to grow and gain the shape of a warrior.");
    }
break;
beginstate 17;
    if (get_flag(201, 7) == 0)
        message_dialog("Near the Alchemist's Lab, the trees are growing taller than normally.", "One of them is so big that you could almost imagine someone building a hut or two in it");
    set_flag(201, 7, 1);    
break;
beginstate 18;
    if (get_flag(201, 6) == 0)
        message_dialog("As you approach the farmhouses, several crossbows point out of the windows. You didn't expect them to be THAT suspicious. Something must be terribly wrong here.", "");
    if (get_flag(201, 6) == 2)
        message_dialog("As you approach the farmhouses, you realize that they're empty.", "Bits of guano are everywhere."); 
    if (get_flag(201, 6) == 1)
    {
		reset_dialog();
		add_dialog_str(0, "The farmers are more than happy for what you did to the bats.", 0);
		add_dialog_str(1, "They offer you fine supplies from their bakery. Do you want to shop?", 0);
		add_dialog_choice(0, "Leave the farm.");
		add_dialog_choice(1, "Do some shopping.");
		choice = run_dialog(1);
		if (choice == 2)
			begin_shop_mode("Bakery", "These farmers are really happy for that you defeated the bat horde. They've pulled their prices way down.", 3, 1, -1);        
	}
break;
beginstate 19;
    message_dialog("When you approach, a man walks out from the house. Then he sees you and says: _Oh hi. You must have come here to buy fish._", "_I am sorry to tell you that I've run out of it. And on top of that I've lost my fishing rod._");
break;